from django.urls import path
from django.views.decorators.csrf import csrf_exempt

from .views import AllLiveView, SonLiveView, LiveSettingView, VerifyLiveStream, GetLiveAddress, GetLiveKey, \
    ChangeLiveRoomLabel, ChangeLabel, OpenLive, ChangeRoomName, ChangeRoomImg, CloseLive, SearchLive, PlayLive, SendMessage

urlpatterns = [
    path('', AllLiveView.as_view(), name='all_live'),
    path('son_live/', SonLiveView.as_view(), name='son_live'),
    path('search_live/', SearchLive.as_view(), name='search_live'),
    path('play_live/', PlayLive.as_view(), name='play_live'),
    path('live_setting/', LiveSettingView.as_view(), name='live_setting'),
    path('live_setting/get_address/', GetLiveAddress.as_view(), name='get_address'),
    path('live_setting/get_key/', GetLiveKey.as_view(), name='get_key'),
    path('live_setting/change_label/', ChangeLiveRoomLabel.as_view(), name='change_label'),
    path('live_setting/modify_label/', ChangeLabel.as_view(), name='modify_label'),
    path('live_setting/change_room_name/', ChangeRoomName.as_view(), name='change_room_name'),
    path('live_setting/change_room_img/', ChangeRoomImg.as_view(), name='change_room_img'),
    path('live_setting/open_live/', OpenLive.as_view(), name='open_live'),
    path('live_setting/close_live/', CloseLive.as_view(), name='close_live'),
    path('play_live/message/', SendMessage.as_view(), name='live_send_message'),

    # srs 回调
    path('verify_live/', csrf_exempt(VerifyLiveStream.as_view()), name='verify_live')
]
